package com.e3.purchase.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.e3.bill.entity.BillMainEntity;

@Entity
@Table(name="T_PO")
public class POMainEntity extends BillMainEntity{
	private static final long serialVersionUID = -3490577507462281438L;
	
	private String billNo;
	
	private Long purchaseCorpId;
	
	private Long purchaseDeptId;
	
	private Long purchaserId;
	
	private Long supplierId;
	
	private Long receiverCorpId;
	
	private String invoiceClient;
	
	private Long paymentProtocalId;
	
	private String remark;
	
	private List<PODetailEntity> detailEntity;
	
	@Column(name="BILL_NO")
	public String getBillNo(){
		return this.billNo;
	}
	
	public void setBillNo(String billNo){
		this.billNo = billNo;
	}
	
	@Column(name="PURCHASE_CORP_ID")
	public Long getPurchaseCorpId(){
		return this.purchaseCorpId;
	}
	
	public void setPurchaseCorpId(Long purchaseCorpId){
		this.purchaseCorpId = purchaseCorpId;
	}
	
	@Column(name="PURCHASE_DEPT_ID")
	public Long getPurchaseDeptId(){
		return this.purchaseDeptId;
	}
	
	public void setPurchaseDeptId(Long purchaseDeptId){
		this.purchaseDeptId = purchaseDeptId;
	}
	
	@Column(name="PURCHASER_ID")
	public Long getPurchaserId(){
		return this.purchaserId;
	}
	
	public void setPurchaserId(Long purchaserId){
		this.purchaserId = purchaserId;
	}
	
	@Column(name="SUPPLIER_ID")
	public Long getSupplierId(){
		return this.supplierId;
	}
	
	public void setSupplierId(Long supplierId){
		this.supplierId = supplierId;
	}
	
	@Column(name="RECEIVER_CORP_ID")
	public Long getReceiverCorpId(){
		return this.receiverCorpId;
	}
	
	public void setReceiverCorpId(Long receiverCorpId){
		this.receiverCorpId = receiverCorpId;
	}
	
	@Column(name="INVOICE_CLIENT")
	public String getInvoiceClient(){
		return this.invoiceClient;
	}
	
	public void setInvoiceClient(String invoiceClient){
		this.invoiceClient = invoiceClient;
	}
	
	@Column(name="PAYMENT_PROTOCAL_ID")
	public Long getPaymentProtocalId(){
		return this.paymentProtocalId;
	}
	
	public void setPaymentProtocalId(Long paymentProtocalId){
		this.paymentProtocalId = paymentProtocalId;
	}
	
	@Column(name="REMARK")
	public String getRemark(){
		return this.remark;
	}
	
	public void setRemark(String remark){
		this.remark = remark;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="mainEntity")
	public List<PODetailEntity> getDetailEntity() {
		return detailEntity;
	}

	public void setDetailEntity(List<PODetailEntity> detailEntity) {
		this.detailEntity = detailEntity;
	}
	
}
